import { baseProcedure, createTRPCRouter } from "@/trpc/init";
import { User } from "@/types";
export default createTRPCRouter({
  getInfo: baseProcedure.mutation(async ({ ctx }) => {
    console.log("getInfo", ctx.token);
    if (!ctx.token) {
      throw new Error("请先登录");
    }
    return {
      id: 1,
      name: "yuxl",
    } as User;
  }),
});
